package com.study.state.gper;

public class UnLoginState extends UserState {
    @Override
    void favorite() {
        switch2Login();
        this.context.favorite();
    }

    @Override
    void comment(String comment) {
        switch2Login();
        this.context.comment(comment);
    }

    private void switch2Login(){
        System.out.println("跳转到登录页！");
        this.context.setState(AppContext.STATE_LOGIN);
    }
}
